<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@page session="true"%>
<%@ page import="javax.portlet.*"%>
<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<portlet:defineObjects />

<script type="text/javascript">
    function getForm(namespace, name) {
        return document.forms[namespace + name];
    }
	function register(namespace, name){
		var frm = getForm(namespace, name);
		frm.txtAction.value = "access_to_register_form";
		frm.submit();
	}
    function login(namespace, name) {
        var frm = getForm(namespace, name);
        frm.txtAction.value = "login";
        frm.submit();
    }
</script>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Personal Information Tracking System</title>
<meta name="keywords" content="" />
<meta name="description" content="" />

<link href='<%=request.getContextPath()+"css/style.css"%>' rel="stylesheet" type="text/css" media="screen" /></head>

<body>
<form name="<portlet:namespace/>loginForm" action="<portlet:actionURL/>" method="POST">
	<input type="hidden" name="txtAction" />
<table align="center">
	<tr class="title">
			<td>		
					<h1><font color="blue">Personal information tracking system </font></h1>
					<p>Exploit the value of data</p>
					<hr />
			</td>
	</tr>
	
	<tr>
		<td>&nbsp;</td>
	</tr>
	<tr>				
		<td>
			<table border="1" width="100%" align="center" cellpadding="2" cellspacing="2">
				<tr>
					<td colspan="2"><h2 class="title" align="center"><font color="orange">Login</font></h2></td>
				</tr>
				<tr>
					<td>UserName</td>
					<td><input name="txtUserName" type="text" /></td>
				</tr>
				<tr>
					<td>Password</td>
					<td><input name="txtPassword" type="password" /></td>
				</tr>
				<tr>
					<td>
						<input type="button" value="Login" 
							onclick="login('<portlet:namespace/>','loginForm')" />
							<br/>
						<a href="#" onclick="register('<portlet:namespace/>','loginForm')">Register now!</a>
					</td>
					<td><p style=""><b><font color="red">${sessionScope.errorMess}</font></b></p></td>
				</tr>
			</table>
		</td>
	</tr>
	
	<tr>
		<td>
			<p>Version 1.1</p>
			<div style="clear: both;">&nbsp;</div>
		</td>
	</tr>
</table>
</form>
</body>

